﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Ext.Net;

namespace ExaminationSys.Helper
{

    public class MessageBoxHelper
    {
        public static void ShowWarning(string title, string message)
        {
            X.Msg.Show(new MessageBoxConfig()
                           {
                               Title = title,
                               Message = message,
                               Icon = MessageBox.Icon.WARNING,
                               Buttons = MessageBox.Button.OK
                           });

        }
        public static void ShowWarning(string message)
        {
            X.Msg.Show(new MessageBoxConfig()
            {
                Title = "提示信息",
                Message = message,
                Icon = MessageBox.Icon.WARNING,
                Buttons = MessageBox.Button.OK
            });

        }
        public static void ShowError(string title, string message)
        {
            X.Msg.Show(new MessageBoxConfig()
            {
                Title = title,
                Message = message,
                Icon = MessageBox.Icon.ERROR,
                Buttons = MessageBox.Button.OK
            });

        }
        public static void ShowError(string message)
        {
            X.Msg.Show(new MessageBoxConfig()
            {
                Title = "错误提示",
                Message = message,
                Icon = MessageBox.Icon.ERROR,
                Buttons = MessageBox.Button.OK
            });

        }


        public static void ShowInfo(string title, string message)
        {
            X.Msg.Show(new MessageBoxConfig()
            {
                Title = title,
                Message = message,
                Icon = MessageBox.Icon.INFO,
                Buttons = MessageBox.Button.OK
            });

        }
        public static void ShowInfo(string message)
        {
            X.Msg.Show(new MessageBoxConfig()
            {
                Title = "提示信息",
                Message = message,
                Icon = MessageBox.Icon.INFO,
                Buttons = MessageBox.Button.OK
            });

        }
    }
}